﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="QuoteDetails.aspx.cs" Inherits="QuoteDetails"
    EnableEventValidation="true" Async="true" MasterPageFile="~/Mobile.master" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/controls/urlLanguage.ascx" TagName="usrLanguage" TagPrefix="uc1" %>
<%@ Register Src="~/controls/usrDate.ascx" TagName="usrDate" TagPrefix="uc2" %>
<%@ Register Src="~/controls/usrOccupation.ascx" TagName="usrOccupation" TagPrefix="uc3" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

<form id="Form1" runat="server">
<section>
<header id="header">
<nav id="nav">
<a href="default.aspx"><div class="branding"></div></a>
<div class="nav">
<%--<uc1:usrLanguage runat="server" ID="hplLanguage" />--%>
<a href="default.aspx">
<asp:Image ID="imgTop" runat="server" ImageUrl="<%$Resources:CarInsurance,TopNavBack%>" Width="49" Height="29" AlternateText="Start" BorderWidth="0" />
</a>
</div>
</nav>
</header>
</section>
    <section id="body">
<div class="body">
<asp:ScriptManager ID="ScriptManager1" EnablePartialRendering="true" runat="server">
    </asp:ScriptManager>
<%--<h1>Free Car Insurance Quote</h1>--%>
<br/>
<div class="form">
<%--<div class="top"></div>--%>
<asp:Image ID="imgHeader" runat="server" ImageUrl="<%$Resources:CarInsurance,QuoteHeader%>" Height="58px" BorderWidth="0" />
 <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="uplCarYear">
            <ProgressTemplate>
            <div style="position:absolute; width: 270px; height: 670px; background-color: Gray; filter: alpha(opacity=90); opacity: 0.8; ">
                <img alt="" src="images/loader/loader_main.gif" style="margin-top: 400px;" />
                </div>
            </ProgressTemplate>
</asp:UpdateProgress>
  <asp:UpdateProgress ID="UpdateProgress2" runat="server" AssociatedUpdatePanelID="uplCarMake">
            <ProgressTemplate>
            <div style="position:absolute; width: 270px; height: 670px; background-color: Gray; filter: alpha(opacity=90); opacity: 0.8; ">
                <img alt="" src="images/loader/loader_main.gif" style="margin-top: 440px;"/>
                </div>
            </ProgressTemplate>
</asp:UpdateProgress>
  <asp:UpdateProgress ID="UpdateProgress3" runat="server" AssociatedUpdatePanelID="uplCarModel">
            <ProgressTemplate>
            <div style="position:absolute; width: 270px; height: 670px; background-color: Gray; filter: alpha(opacity=90); opacity: 0.8; ">
                <img alt="" src="images/loader/loader_main.gif" style="margin-top: 470px;"/>
                </div>
            </ProgressTemplate>
</asp:UpdateProgress>
<div class="pad">
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ValidationGroup="carquote" ShowSummary="True" CssClass="errorSummary" >
</asp:ValidationSummary>

<asp:UpdatePanel ID="uplInsuranceClass" runat="server">
<ContentTemplate> 
<asp:DropDownList ID="ddlInsuranceClass" runat="server" Width="233px" CssClass="input" AutoPostBack="true" OnSelectedIndexChanged="ddlInsuranceClass_SelectedIndexChange">
<asp:ListItem Text="<%$Resources:CarInsurance,SelectInsuranceClass%>" Value="-1"></asp:ListItem>
<%--<asp:ListItem Text="<%$Resources:CarInsurance,Insurance_ClassOneLowCost%>" Value="11"></asp:ListItem>--%>
<asp:ListItem Text="<%$Resources:CarInsurance,Insurance_ClassOne%>" Value="10"></asp:ListItem>
<asp:ListItem Text="<%$Resources:CarInsurance,Insurance_ClassTwoPlus%>" Value="21"></asp:ListItem>
<asp:ListItem Text="<%$Resources:CarInsurance,Insurance_ClassThree%>" Value="30"></asp:ListItem>
<asp:ListItem Text="<%$Resources:CarInsurance,Insurance_ClassThreePlus%>" Value="31"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="rfvInsuranceClass" ControlToValidate="ddlInsuranceClass" InitialValue="-1" runat="server" 
 ValidationGroup="carquote" CssClass="validationErrorControl" Text="" ErrorMessage=""></asp:RequiredFieldValidator>
<asp:DropDownList ID="ddlGarageType" runat="server" Width="233px" CssClass="input">
<asp:ListItem Value="-1" Text="<%$ Resources:CarInsurance,GarageTYpe%>" />
<asp:ListItem Value="1" Text="<%$ Resources:CarInsurance,Garage_Authorized%>" />
<asp:ListItem Value="2" Text="<%$ Resources:CarInsurance,Garage_Dealer%>" />
</asp:DropDownList>
<asp:RequiredFieldValidator CssClass="validationErrorControl" ID="rfvGarageType" ControlToValidate="ddlGarageType" InitialValue="-1" runat="server" ErrorMessage="" Text="" ValidationGroup="carquote"></asp:RequiredFieldValidator>
 </ContentTemplate>
 </asp:UpdatePanel>
<div style="display:none;">
<asp:TextBox ID="txtName" runat="server" Text="<%$Resources:CarInsurance,YourName%>" CssClass="input" Width="220px" ></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvName" ControlToValidate="txtName" runat="server" InitialValue="Your name ..."
 ValidationGroup="carquote" Display="Dynamic" CssClass="validationErrorControl" Enabled="false" ErrorMessage=""></asp:RequiredFieldValidator>
<br /></div>
<asp:TextBox ID="txtFirstName" runat="server" Text="<%$Resources:CarInsurance,YourName%>" CssClass="input" Width="220px" ></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txtFirstName" runat="server" InitialValue="Your name ..."
 ValidationGroup="carquote" Display="Dynamic" CssClass="validationErrorControl" Enabled="false" ErrorMessage=""></asp:RequiredFieldValidator>
<br />
<%--<asp:TextBox ID="txtLastName" runat="server" Text="<%$Resources:CarInsurance,YourLastName%>" CssClass="input" Width="220px" ></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" ControlToValidate="txtLastName" runat="server" InitialValue="Your last name ..."
 ValidationGroup="carquote" Display="Dynamic" CssClass="validationErrorControl" ErrorMessage=""></asp:RequiredFieldValidator>
 <br />--%>
<html5:emailinput ID="txtEmail" runat="server" Text="<%$Resources:CarInsurance,YourEmail%>" CssClass="input" Width="220px">
    </html5:emailinput>
<asp:RequiredFieldValidator ID="rfvtxtEmail" ControlToValidate="txtEmail" runat="server" 
 ValidationGroup="carquote" Display="Dynamic" CssClass="validationErrorControl" ErrorMessage=""></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="rfvEmailValid" Text="" CssClass="validationErrorControl" runat="server" ValidationGroup="carquote" ControlToValidate="txtEmail"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" Display="Dynamic" ErrorMessage=""></asp:RegularExpressionValidator><br/>

<div id="divEmail" runat="server" visible="false">
<small><font color="red">Email already exists</font></small>
</div>
 <asp:DropDownList ID="ddlMobile" runat="server"  ToolTip ="Mobile No" Width="70" CssClass="input" >
        <asp:ListItem Text="<%$Resources:CarInsurance,Select%>" Value="-1" />
        <asp:ListItem Text="080" Value="080" />
        <asp:ListItem Text="081" Value="081" />
        <asp:ListItem Text="082" Value="082" />
        <asp:ListItem Text="083" Value="083" />
        <asp:ListItem Text="084" Value="084" />
        <asp:ListItem Text="085" Value="085" />
        <asp:ListItem Text="086" Value="086" />
        <asp:ListItem Text="087" Value="087" />
        <asp:ListItem Text="088" Value="088" />
        <asp:ListItem Text="089" Value="089" />
        <asp:ListItem Text="090" Value="090" />
        <asp:ListItem Text="091" Value="091" />
        <asp:ListItem Text="092" Value="092" />
        <asp:ListItem Text="093" Value="093" />
        <asp:ListItem Text="094" Value="094" />
        <asp:ListItem Text="095" Value="095" />
        <asp:ListItem Text="096" Value="096" />
        <asp:ListItem Text="097" Value="097" />
        <asp:ListItem Text="098" Value="098" />
        <asp:ListItem Text="099" Value="099" />  
    </asp:DropDownList>
    <asp:RequiredFieldValidator ID="rfvMobile" ControlToValidate="ddlMobile" runat="server" InitialValue="-1"
 ValidationGroup="carquote" Display="Dynamic" CssClass="validationErrorControl" ErrorMessage=""></asp:RequiredFieldValidator>
<html5:PhoneInput ID="txtPhoneNum"
    Text="<%$Resources:CarInsurance,YourPhone%>" CssClass="input" Width="135px" MaxLength="7" ToolTip="Enter 7 digits phone number." runat="server">
    </html5:PhoneInput>
<asp:RequiredFieldValidator ID="rfvtxtPhoneNum" ControlToValidate="txtPhoneNum" runat="server" 
 ValidationGroup="carquote" Display="Dynamic" CssClass="validationErrorControl" ErrorMessage=""></asp:RequiredFieldValidator><br/>
 <%--Phone number is not valid.--%>
   <%-- <asp:CustomValidator CssClass="validationErrorControl" ID="csvPhoneNo" runat="server" ValidationGroup="carquote"
        ClientValidationFunction="CheckPhoneNoClientValidate" ControlToValidate="txtPhoneNum"
        Display="Dynamic" Text="" ErrorMessage="" OnServerValidate="CheckPhoneNoServerValidation" ></asp:CustomValidator>--%>
    <%--Phone number must be 9 digits number value.--%>
<asp:RegularExpressionValidator CssClass="validationErrorControl" ID="revPhoneNo" ValidationGroup="carquote"
        runat="server" ValidationExpression="[0-9]{7}" ControlToValidate="txtPhoneNum"
        ErrorMessage="" Text="" Display="Dynamic" ></asp:RegularExpressionValidator>
        <asp:Label ID="Label4" runat="server" Text="<%$ Resources:CarInsurance,DOB%>" /> <br />

<uc2:usrDate ValidationGroup="carquote" ErrorMessage="" ID="usrDOB" runat="server" />
<uc3:usrOccupation ID="ddlOccupation" runat="server" IsEnabled="true" ValidationGroup="carquote" ErrorMessage="" />
<asp:DropDownList ID="ddlGender" runat="server" ToolTip="Choose Gender" CssClass="input" Width="120px" >
    <asp:ListItem Selected="True" Value="-1" Text="<%$ Resources:CarInsurance,Select%>"></asp:ListItem>
    <asp:ListItem Value="M" Text="<%$ Resources:CarInsurance,Male%>"></asp:ListItem>
    <asp:ListItem Value="F" Text="<%$ Resources:CarInsurance,Female%>"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator CssClass="validationErrorControl" ID="rfvGender" runat="server" 
    ErrorMessage="" Text="" InitialValue="-1"  ValidationGroup="carquote"
    ControlToValidate="ddlGender"></asp:RequiredFieldValidator>
     <asp:DropDownList ID="ddlNCB" Width="80px" runat="server" CssClass="input">
 <asp:ListItem Text="<%$ Resources:CarInsurance,SelectNCB%>" Value="-1"></asp:ListItem>
 <asp:ListItem Text="0" Value="0"></asp:ListItem>
 <asp:ListItem Text="20" Value="20"></asp:ListItem>
 <asp:ListItem Text="30" Value="30"></asp:ListItem>
 <asp:ListItem Text="40" Value="40"></asp:ListItem>
 <asp:ListItem Text="50" Value="50"></asp:ListItem>
 <%--<asp:ListItem Text="50" Value="50"></asp:ListItem>--%>
 </asp:DropDownList>%
<asp:RequiredFieldValidator CssClass="validationErrorControl" ID="rfvNCB" Enabled="true" runat="server" InitialValue="-1" ControlToValidate="ddlNCB" ErrorMessage="" ValidationGroup="carquote"></asp:RequiredFieldValidator>
<br/>
<asp:UpdatePanel ID="uplCarYear" runat="server">
<ContentTemplate>        
<asp:DropDownList ID="ddlCarYear" runat="server" Width="233px" CssClass="input" AutoPostBack="True" OnSelectedIndexChanged="ddlCarYear_SelectedIndexChanged">
<asp:ListItem Text="<%$Resources:CarInsurance,SelectCarYear%>" Value="-1">
</asp:ListItem> 
</asp:DropDownList>
<asp:RequiredFieldValidator ID="rfvCarYear" ControlToValidate="ddlCarYear" InitialValue="-1" runat="server" 
 ErrorMessage="" Text="" ValidationGroup="carquote" Display="Dynamic" CssClass="validationErrorControl"></asp:RequiredFieldValidator>
 </ContentTemplate>
 </asp:UpdatePanel>

<asp:UpdatePanel ID="uplCarMake" runat="server">
<ContentTemplate>
<asp:DropDownList ID="ddlCarMake" runat="server" Width="233px" CssClass="input" AutoPostBack="true" OnSelectedIndexChanged="ddlCarMake_SelectedIndexChanged">
<asp:ListItem Text="<%$Resources:CarInsurance,SelectCarMake%>" Value="-1">
</asp:ListItem>
</asp:DropDownList>
 <asp:RequiredFieldValidator ID="rfvCarMake" ControlToValidate="ddlCarMake" InitialValue="-1" runat="server" 
 ValidationGroup="carquote" Display="Dynamic" CssClass="validationErrorControl" ErrorMessage=""></asp:RequiredFieldValidator>
 </ContentTemplate>
 </asp:UpdatePanel>

<asp:UpdatePanel ID="uplCarModel" runat="server">
<ContentTemplate>
<asp:DropDownList ID="ddlCarModel" runat="server" Width="233px" CssClass="input" AutoPostBack="true" OnSelectedIndexChanged="ddlCarModel_SelectedIndexChanged">
<asp:ListItem Text="<%$Resources:CarInsurance,SelectCarModel%>" Value="-1">
</asp:ListItem>
</asp:DropDownList>
 <asp:RequiredFieldValidator ID="rfvCarModel" ControlToValidate="ddlCarModel" InitialValue="-1" runat="server" 
 ValidationGroup="carquote" Display="Dynamic" CssClass="validationErrorControl" ErrorMessage=""></asp:RequiredFieldValidator>
 
</ContentTemplate>
</asp:UpdatePanel>
<asp:Label runat="server" ID="lblSumInsured" Text="0" Visible="false" />
  <asp:Label runat="server" ID="lblCarVehicleType" Text="" Visible="false" />
   <div style="display: none">
    <asp:TextBox ID="txtSumInsured" MaxLength="9" Width="80px" Text="0" runat="server" />
    <asp:TextBox ID="txtNewSumInsured" MaxLength="9" Width="80px" runat="server" />
    <asp:TextBox ID="txtGroupNo" Text="-1" MaxLength="2" Width="30px" runat="server" />
     <asp:DropDownList ID="ddlVehicleType" runat="server" >
                                                        <asp:ListItem Value="110" Text="<%$ Resources:CarInsurance,VehicleType_Private%>" />
                                                    </asp:DropDownList>
   </div>
   <asp:Label ID="lblCCDate" runat="server" Text="<%$ Resources:ProposalForm,CoverCommencementDate %>"></asp:Label>
<br/>
<uc2:usrDate ValidationGroup="carquote" ErrorMessage="" ID="usrCommencementDate" runat="server" IsNotLessThanToday="true" />
<br />
<%--<div class="apply">
<asp:ImageButton ID="imgbtnApply" runat="server" ValidationGroup="carquote"
     Width="240px" Height="46px" BorderWidth="0"  onclick="imgbtnApply_Click" OnClientClick="LoadValidationErrorCss();" />
</div>--%>
<asp:Label ID="lblMessage" runat="server"></asp:Label>
<asp:Button ID="btnApply" runat="server" Width="250" Height="46" BorderWidth="0" ValidationGroup="carquote" OnClientClick="LoadValidationErrorCss()" onclick="btnApply_Click"  CssClass="<%$Resources:CarInsurance,QuoteNow%>" />


 <div id="divExisting" runat="server" visible="false" style="display:none;">

 <asp:Label ID="lblExistingUser" runat="server" Text="<%$ Resources:CarInsurance,ExistingUser%>" /> <asp:RadioButton ID="rdoExistingNo" runat="server" GroupName="existinguser" Checked="true" onclick="HidePopup();" />
                                                <asp:Label ID="lblNo" runat="server" Text="<%$ Resources:CarInsurance,Option_No%>"></asp:Label>
                                                &nbsp;
                                                <asp:RadioButton ID="rdoExistingYes" runat="server" Text="" GroupName="existinguser"
                                                    AutoPostBack="true" OnCheckedChanged="rdoExistingYes_CheckedChanged" />
                                                <asp:Label ID="lblYes" runat="server" Text="<%$ Resources:CarInsurance,Option_Yes%>"></asp:Label>
</div>
<br/><br />
<div id="divLoggedin" runat="server" visible="false">
<asp:HyperLink ID="hlnkCompletedQuote" runat="server" Text="" NavigateUrl="user_details.aspx" Visible="false" ImageUrl="~/images/button/view-quote.png"></asp:HyperLink>
<asp:HyperLink ID="hlnkChangePassword" runat="server" Text="" NavigateUrl="~/ChangePassword.aspx" ImageUrl="~/images/button/change-passwordGray.png"  Visible="false"></asp:HyperLink>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:ImageButton ID="imgbtnLogout" runat="server" ImageUrl="~/images/button/logout.png" Visible="false" OnClick="imgbtnLogout_Click" />

<hr />
</div>
<a href="tel:022688222" >
<asp:Image ID="imgCallHotline" runat="server" ImageUrl="<%$Resources:CarInsurance,ImageHotline%>" Width="220" AlternateText="Call us at 02 268 8222" BorderWidth="0" /></a><br />

<br/>

<section class="note">
<asp:Label ID="Label3" runat="server" Text="<%$ Resources:CarInsurance,ReadAbout%>" /> <asp:HyperLink ID="hlnkAboutUs" runat="server" Target="_blank" Text="GluayGluay.com" Visible="false"></asp:HyperLink>
</section>
</div>

<div class="bottom"></div>
</div>
 <div id="divPopup">
                        <div style="margin: 0 auto; width: 266px; text-align: center; display: none;">
                            <asp:ImageButton ID="imgbtnTest" runat="server" ImageUrl="/images/button/reminder_travel_travelpack.png"
                                AlternateText="Set Travel Insurance Reminder" />
                        </div>
                        <cc1:ModalPopupExtender ID="mpePassword" runat="server" TargetControlID="imgbtnTest"
                            PopupControlID="pnlPassword" BackgroundCssClass="modalBackground" DropShadow="true"
                            BehaviorID="mdlPopupPassword">
                        </cc1:ModalPopupExtender>
                        <asp:Panel ID="pnlPassword" runat="server" Style="display: none; background-color: White;"
                            DefaultButton="imgbtnLogin">
                            <asp:UpdatePanel ID="upPassword" runat="server" UpdateMode="Conditional">
                                <ContentTemplate>
                                    <div class="sr_wrapper_travel_new" style="width: 300px; padding: 20px; border: 9px solid #3b3b3b;
                                        overflow: visible; height: auto;">
                                        <div class="sr_content_travel_3">
                                            <div class="sr_form_new">
                                                <h1>
                                                    <%= GetGlobalResourceObject("CarInsurance","SignInNow") %></h1>
                                                <div>
                                                    <asp:Label ID="lblAccountMessage" runat="server"></asp:Label>
                                                </div>
                                                <br />
                                                <div>
                                                    <asp:ValidationSummary ID="ValidationSummary2" runat="server" ValidationGroup="userpassword"
                                                        ShowSummary="True" CssClass="errorSummary" HeaderText="<%$Resources:CarInsurance,RequiredField %>">
                                                    </asp:ValidationSummary>
                                                </div>
                                                <br />
                                                <div class="f_row">
                                                    <span class="form_l email_ico">
                                                        <%= GetGlobalResourceObject("CarInsurance", "EmailAddress")%></span>                                                   
                                                        <div class="clear">
                                                    </div>
                                                </div>
                                                 <div class="f_row">
                                                    <div class="f_field">
                                                        <asp:TextBox ID="txtExEmail" runat="server" Width="210px" />
                                                    </div>
                                                    <div class="f_field">
                                                        <asp:RequiredFieldValidator ID="rfvExEmail" CssClass="validationErrorControl" runat="server"
                                                            ValidationGroup="userpassword" ErrorMessage="" Text="" ControlToValidate="txtExEmail"
                                                            Display="Dynamic"></asp:RequiredFieldValidator>
                                                        <asp:RegularExpressionValidator CssClass="validationErrorControl" ID="rfvExEmailValid"
                                                            runat="server" ValidationGroup="userpassword" ErrorMessage="" Text="" ControlToValidate="txtExEmail"
                                                            ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" Display="Dynamic"></asp:RegularExpressionValidator>
                                                    </div>
                                                    <div class="clear">
                                                    </div>
                                                 </div>
                                                 <br />
                                                <div class="f_row">
                                                   <span class="form_l name_ico">
                                                        <%= GetGlobalResourceObject("CarInsurance", "Password")%></span>
                                                        <div class="clear">
                                                    </div>
                                                </div>
                                                <div class="f_row">
                                                 
                                                    <div class="f_field">
                                                        <asp:TextBox ID="txtExAuthCode" runat="server" TextMode="Password" CssClass="form_login" Width="210px" />
                                                    </div>
                                                    <div class="f_field">
                                                        <asp:RequiredFieldValidator ID="rfvExAuthCode" CssClass="validationErrorControl"
                                                            runat="server" ValidationGroup="userpassword" ErrorMessage="" Text="" ControlToValidate="txtExAuthCode"
                                                            Display="Dynamic"></asp:RequiredFieldValidator>
                                                        <asp:Label runat="server" ID="lblEmailMessage" Visible="false" CssClass="validationError"></asp:Label>
                                                    </div>
                                                    <br />
                                                    <br />
                                                    <div class="f_field">
                                                        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="passwordrecovery.aspx"
                                                            onclick="HidePopup();ShowHidePasswordPanel(true);"><%= GetGlobalResourceObject("CarInsurance", "ForgotPassword")%></asp:HyperLink>
                                                    </div>
                                                    <div class="clear">
                                                    </div>
                                                </div>
                                                <div class="f_row">
                                                    <asp:Label ID="Label1" runat="server" CssClass="assumption"></asp:Label>
                                                </div>
                                                <div id="div1" style="display: none">
                                                    <table style="width: 100%;">
                                                        <tr>
                                                            <td align="center" valign="middle">
                                                                <img src="/images/loader/loader_main.gif" id="img1" alt="Loading" width="30" height="20" />
                                                                <span id="Span1">Please wait...</span>
                                                            </td>
                                                        </tr>
                                                        <tr align="right">
                                                            <td>
                                                                <a id="A2" href="javascript:StopSubmit();">Cancel</a>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </div>
                                                <div class="f_row">
                                                    &nbsp;</div>
                                                <div class="f_row">
                                                    <asp:Label ID="Label2" Text="" Font-Size="12px" ForeColor="Green" Font-Bold="true"
                                                        Font-Names="Arial" runat="server"></asp:Label>
                                                </div>
                                                <div class="f_row sr_button">
                                                    <asp:Button ID="imgbtnLogin" runat="server" onmousedown="this.className = 'button_proceed_mousedown';"
                                                        onmouseup="this.className = 'button_proceed';" onmouseout="this.className = 'button_proceed';"
                                                        CssClass="button_proceed" OnClientClick="LoadValidationErrorCss();HideOnSubmit();if (Page_ClientValidate('userpassword')){this.removeAttribute('onmouseout');this.removeAttribute('onmouseup');this.className = 'button_processing';}"
                                                        ValidationGroup="userpassword" AlternateText="Sign in" ToolTip="Sign in" OnClick="imgbtnLogin_Click" /><div
                                                            style="display: none;">
                                                            <input id="inputLoginCount" runat="server" value="0" />
                                                            <input id="inputHideSignal" runat="server" value="0" /><input id="inputLoginHide"
                                                                runat="server" value="0" /></div>
                                                </div>
                                            </div>
                                        </div>
                                        <div style="text-align: right; width: 100%;">
                                            <asp:Button ID="btnPasswordClose" runat="server" Text=""
                                                Width="87px" OnClick="btnPasswordClose_Click" OnClientClick="HidePopup();ShowHidePasswordPanel(true);" CssClass="button_close" />
                                        </div>
                                    </div>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </asp:Panel>
                    </div>
<input id="inputLang" value="" style="display:none;" />
</div> 
</section>
</form>

<script type="text/javascript">
<!--
        function RemoveSpace(c) {
            c.value = c.value.split(' ').join('')
        }

        function PhoneNoLengthClientValidate(source, arguments) {
            if (arguments.Value.length != 0 && arguments.Value.length < 9) {
                arguments.IsValid = false;
            } else {
                arguments.IsValid = true;
            }
        }

        function CheckPhoneNoClientValidate(source, arguments) {
            var cval = parseInt(arguments.Value)
            if (isNaN(cval)) {
                arguments.IsValid = false;
            } else {
                var cstrVal = "" + cval + "";
                if (cstrVal.length < 8) {
                    arguments.IsValid = false;
                }
                else if (cstrVal.charAt(0) != "6" &&
                    cstrVal.charAt(0) != "8" &&
                    cstrVal.charAt(0) != "9") {
                    arguments.IsValid = false;
                }
                else {
                    arguments.IsValid = true;
                }
            }
        }

        function DefaultFirstName(TextBoxControl, TextBoxEvent) {
            if (TextBoxControl.value.length == 0 && TextBoxEvent.type == "blur") {
                if (document.getElementById('inputLang').value == 'EN') {
                    TextBoxControl.value = "Your name ...";
                 }
                 else {
                     TextBoxControl.value = "ชื่อ"; 
                }
                
            }
            //alert("default first name.");
        }

        function DefaultLastName(TextBoxControl, TextBoxEvent) {
            if (TextBoxControl.value.length == 0 && TextBoxEvent.type == "blur") {
                if (document.getElementById('inputLang').value == 'EN') {
                    TextBoxControl.value = "Your last name ...";
                }
                
            }
            //alert("default last name.");
        }

        function DefaultEmail(TextBoxControl, TextBoxEvent) {
            if (TextBoxControl.value.length == 0 && TextBoxEvent.type == "blur") {
                if (document.getElementById('inputLang').value == 'EN') {
                    TextBoxControl.value = "Your E-mail address ...";
                }
                else {
                    TextBoxControl.value = "อีเมล์";
                }
                
            }
            //alert("default email.");
        }

        function DefaultPhone(TextBoxControl, TextBoxEvent) {
            if (TextBoxControl.value.length == 0 && TextBoxEvent.type == "blur") {
                if (document.getElementById('inputLang').value == 'EN') {
                    TextBoxControl.value = "Your Phone number ...";
                }
                else {
                    TextBoxControl.value = "เบอร์โทรศัพท์";
                }
            }
            //alert("default phone.");
        }

        function ClearText(TextBoxControl, TextBoxEvent) {
            if (TextBoxControl.value == "Your name ...") {
                TextBoxControl.value = "";
                document.getElementById('inputLang').value = 'EN'
            }
            if (TextBoxControl.value == "ชื่อ") {
                TextBoxControl.value = "";
                document.getElementById('inputLang').value = 'TH'
            }
            if (TextBoxControl.value == "Your E-mail address ...") {
                TextBoxControl.value = "";
                document.getElementById('inputLang').value = 'EN'
            }

            if (TextBoxControl.value == "อีเมล์") {
                TextBoxControl.value = "";
                document.getElementById('inputLang').value = 'TH'
            }
            if (TextBoxControl.value == "Your Phone number ...") {
                TextBoxControl.value = "";
                document.getElementById('inputLang').value = 'EN'
            }
            if (TextBoxControl.value == "เบอร์โทรศัพท์") {
                TextBoxControl.value = "";
                document.getElementById('inputLang').value = 'TH'
            }
        }

        function ShowPopup() {
            var modpop = $find("mdlPopupPassword");
            if (!modpop) { return; }
            modpop.show()
        }

        function HidePopup() {
            var modpop = $find("mdlPopupPassword");

            if (!modpop) { return; }
            modpop.hide()
        }

        function ShowHidePasswordPanel(OnOff) {
            if (OnOff == true) {
                document.getElementById('<%=pnlPassword.ClientID%>').style.display = 'none';
            }
            else {
                document.getElementById('<%=pnlPassword.ClientID%>').style.display = '';
            }
        }

        function HideOnSubmit() {

            isHide = document.getElementById('<%=inputHideSignal.ClientID%>').value;

            //alert(isHide);
            if (isHide == "1") {
                HidePopup();
                ShowHidePasswordPanel(true);
            }
        }


        Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequestHandler);
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);

        function BeginRequestHandler(sender, args) {
            //alert('begin');         
        }

        function EndRequestHandler(sender, args) {
            //alert('end');
            isHide = document.getElementById('<%=inputLoginHide.ClientID%>').value;

            if (isHide == "1") {
                HidePopup();
                ShowHidePasswordPanel(true);
                window.location = "your-details.aspx"

            }
        }

        //window.onunload = OkGo;
        function OkGo() {
            alert(document.getElementById('<%=inputHideSignal.ClientID%>').value);
        }
    //-->
    </script>
</asp:Content>

